package cn.hg.jfsa.manage.controller.module.ad.validator;

import cn.hg.base.jfinal.validator.BaseValidator;
import com.jfinal.core.Controller;

public class AdPlaceValidator extends BaseValidator {

	@Override
	protected void validate(Controller c) {
		this.setShortCircuit(true);

		this.validateRequired("adPlace.status", "statusMsg", "状态为必填！");
		this.validateRequired("adPlace.style", "modelMsg", "展示模式为必填！");
		this.validateRequired("adPlace.device", "deviceMsg", "设备为必填！");

		this.validateString("adPlace.name", 3, 50, "nameMsg", "位置名必须填写3到50长度的字符！");
	}

	@Override
	protected void handleError(Controller c) {

	}

}
